﻿using System;
using System.Runtime.Serialization;

namespace NCMIS.ObjectModel.MetaData
{
    /// <summary>
    /// Defines the type of a CMIS property, as specified by the W3C Recommendation 28 October 2004,
    /// http://www.w3.org/TR/xmlschema-2/, along with CMIS-specific extensions.
    /// </summary>
    [DataContract(Namespace = CmisNs.Cmis)]
    public enum CmisPropertyType
    {
        /// <summary>
        /// Represents the boolean property type; xsd:boolean.
        /// </summary>
        [EnumMember(Value = "boolean")]
        Boolean,

        /// <summary>
        /// Represents the ID property type; CMIS-specific.
        /// </summary>
        [EnumMember(Value = "id")]
        Id,

        /// <summary>
        /// Represents the integer property type; xsd:integer.
        /// </summary>
        [EnumMember(Value = "integer")]
        Integer,

        /// <summary>
        /// Represents the datetime property type; xsd:dateTime.
        /// </summary>
        [EnumMember(Value = "datetime")]
        Datetime,

        /// <summary>
        /// Represents both the decimal property types; xsd:float with 32-bit precision (single-precision)
        /// and xsd:double with 64-bit precision (double-precision).
        /// </summary>
        [EnumMember(Value = "decimal")]
        @Decimal,

        /// <summary>
        /// Represents the html property type; CMIS-specific.
        /// </summary>
        [EnumMember(Value = "html")]
        Html,

        /// <summary>
        /// Represents the string property type; xsd:string.
        /// </summary>
        [EnumMember(Value = "string")]
        @String,

        /// <summary>
        /// Represents the uri property type; xsd:anyURI.
        /// </summary>
        [EnumMember(Value = "uri")]
        Uri,
    }
}
